//
//  HomePageCollectionViewCell.m
//  LubanWork
//
//  Created by xiaohao on 2020/1/1.
//  Copyright © 2020 xiaohao. All rights reserved.
//

#import "HomePageCollectionViewCell.h"

@implementation HomePageCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self setFrame];
    }
    return self;
}
-(void)setFrame{
    [self addSubview:self.imageView];
    [self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self);
        make.top.mas_offset(kSCRATIO(4));
        make.width.height.mas_offset(kSCRATIO(55));
    }];
    [self addSubview:self.titLab];
    [self.titLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self.imageView);
        make.top.mas_equalTo(self.imageView.mas_bottom).mas_offset(kSCRATIO(8.5));
        make.width.mas_offset(kSCRATIO(65));
        make.height.mas_offset(kSCRATIO(12.5));
    }];
    
   
}

-(UIImageView *)imageView{
    if (!_imageView) {
        _imageView = [[UIImageView alloc] init];
    }
    return _imageView;
}

-(UILabel *)titLab{
    if (!_titLab) {
        _titLab = [[UILabel alloc] init];
        _titLab.text = @"默认111";
        _titLab.font = [UIFont systemFontOfSize:13];
        _titLab.textAlignment = NSTextAlignmentCenter;
        _titLab.textColor = kColorFromRGBHex(0x555555);
    }
    return _titLab;
}
@end
